import { forwardRef, Module } from '@nestjs/common';
import { MovieService } from './movies.service';
import { MovieController } from './movies.controller';
import { jwtConstants, signOptions } from 'src/common/auth/constants';
import { JwtModule } from '@nestjs/jwt';
import { TypeOrmModule } from '@nestjs/typeorm';
import { MovieEntity } from 'src/modules/admin/movies/entities/movie.entity';
import { MoviesEpisodeEntity } from 'src/modules/admin/movies-episode/entities/movies-episode.entity';

@Module({
  imports: [
    TypeOrmModule.forFeature([MovieEntity, MoviesEpisodeEntity]),
    JwtModule.register({
      secret: jwtConstants.secret,
      signOptions,
    }),
  ],
  controllers: [MovieController],
  providers: [MovieService]
})
export class MoviesModule { }
